package com.saxon.Demo01;

public class Proxy implements Rent{
    private Host host;

    public Proxy (Host host) {
        this.host = host;
    }

    @Override
    public void rent () {
        seeHouse ();
        host.rent ();
        HungUp ();
        fare ();
    }
    //其他业务，区别于真实业务
    public void fare(){
        System.out.println ("交钱,中介赚取差价");
    }
    public  void seeHouse(){
        System.out.println ("中介带你看房");
    }
    public void HungUp(){
        System.out.println ("签订合同");
    }
}
